home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / tagbr.zip / TAGTEST.PRG < prev   
Text File  |  1993-04-22  |  1KB  |  46 lines

  1. /*
  2.   ┌──────────────────────────────────────────────────────────────────────────┐
  3.   │  Application: TAGTEST.PRG                                                │
  4.   │       Author: Nicholas Solomon                                           │
  5.   └──────────────────────────────────────────────────────────────────────────┘
  6.     compile:    clipper tagtest /a/n/w
  7.                     clipper tagbrow /a/n/w
  8.  
  9.     link:       rtlink fi tagtest, tagbrow
  10.  
  11. */
  12.  
  13. #include "tagbrow.ch"
  14.  
  15. func main()
  16.     local x, aRecsSelected:={}
  17.  
  18.     /* first create temp dbf */
  19.     dbcreate( 'TAGBROW.DBF', { { 'TEST_SAMPLE', 'C', 15, 0 }} )
  20.     use tagbrow alias tag exclusive new
  21.     for x := 1 to 25
  22.         dbappend()
  23.         replace tag->test_sample with 'Choice ' + str(x,2)
  24.     next
  25.     dbgotop()
  26.  
  27.     cls
  28.     /* now make call to tagbrow */
  29.     create tagbrowse array aRecsSelected usefield 'test_sample' ;
  30.         top 5 left 20 colname 'SELECT' ;
  31.         title 'Tag Browse' message
  32.  
  33.     /* now display the contents of the selected items */
  34.     cls
  35.     ? 'The selected (tagged) items: '
  36.     ? ''
  37.     x:=0
  38.     aeval( aRecsSelected, { |ele| dbgoto(ele), ;
  39.                                   QOUT( str(++x,2) + '. ' + ;
  40.                                   tag->test_sample ) } )
  41.  
  42.     dbcloseall()
  43.     ferase('TAGBROW.DBF')
  44. return (nil)
  45.  
  46.